from django.test import TestCase
from hashlib import sha256
# Create your tests here.
pwd = '123456'
account = 'laoliu3'
sha = sha256()
sha.update(pwd.encode('utf-8'))
sha.update(account.encode('utf-8'))
sha.update((pwd[-1]+account[0]+pwd[0]+account[-1]).encode('utf-8'))

pwd =sha.hexdigest()
print(pwd,type(pwd))
